Copyright: Sebastian Modersohn Softwaredevelopment


The MicroScroll and MenuButton
SMWCC 2.0 (Structo & MenuButton)

This is a shareware product. This allows you to try the software before you buy it. If after evaluating this control, you decide to continue using it, you are required to register the control by remitting the registration fee of $10 to us.

See How to register for information on registering this control.

The MenuButton	The Structo Control

See also:

How to install

How to register

Other controls

Other procucts


The MenuButton Control

This control I knew from the Mac and from the Search dialog of WinWord 6 and because I found it useful, I implemented it here.

It is something like a button and it displays a local menu if it was pressed. In my opinion it is better to use this control instead of making a ComboBox which reacts if an item was choosen.

Like a normal menu item, the MenuButton sends a wm_Command message to it's parent with the ID of the menu item in wParam. Don't forget to check the lParamHi if the message was really send from a menu and not from an other control or from an accelerator (See the demo code for more details).

But you can also use the "normal" way and write a message procedure something like that:

procedure Item1(var Msg: TMessage);

  virtual cm_first + cm_Item1;

Methods:

AppendItem

AppendItemAndRow

AppendSeparator

See also:

How to install

How to register

Other controls

Other procucts


TMButton.AppendItem
TMButton.AppendItem (Method)

Syntax:

function AppendItem(Id: Word; NewItem: PChar): Bool;

Description:

Adds an item to the menu of the button. The result is not null if it was succesfully, it is null if it wasn't.

See also:

AppendItemAndRow

AppendSeparator

The MenuButton


TMButton.AppendItemAndRow
TMButton.AppendItemAndRow (Method)

Syntax:

function AppendItemAndRow(Id: Word; NewItem: PChar): Bool;

Description:

Does the same like AppendItem but the new item of the menu will placed in a new row. The result is not null if it was succesfully, it is null if it wasn't.

See also:

AppendItem

AppendSeparator

The MenuButton


TMButton.AppendSeparator
TMButton.AppendSeparator (Method)

Syntax:

function AppendSeparator: Bool;

Description:

Adds a separator to the menu of the button. The result is not null if it was succesfully, it is null if it wasn't.

See also:

AppendItem

AppendItemAndRow

The MenuButton


The Structo Control

This is a control what gives you the simple possibility to draw everything you want inside a dialog, and to scroll your drawing. I used it do display metafiles and to write structural charts (that's why the name Structo) in dialogs.

The use of the control is quite simple:

1.	the Structo sends a wm_MeasureItem to the parent (normally a dialog) to get the width and the height of the drawable area.
2.	everytime the Structo has to repaint it sends a wm_DrawItem message to the parent. Note that the rcItem field of the DrawItemStruct record is the full drawable area and not the rect that has to be repainted. This is because of displaying bitmaps or metafiles were you need the full rect area. If you need more help for the messages and its arguments see the help of Borland Pascal or the Windows-IDE you use.
Methods:

InitResource

SetupWindow

Paint

See also:

How to install

How to register

Other procucts and Controls


TStructo.InitResource
TStructo.InitResource (Method)

Syntax:

constructor InitResource(AParent: PWindowsObject; ResourceId: Word);

Description:

Initializes the Structo and its Scroller and sets the styles ws_HScroll and ws_VScroll. The parameters are as usual.

See also:

The Structo Control


TStructo.SetupWindow
TStructo.SetupWindow (Method)

Syntax:

procedure SetupWindow; virtual;

Description:

Calls the inherited SetupWindow and fills a TMeasureItemStruct for sending the wm_MeasureItem message to set the values of the scroller. Do not call this method a second time!

See also:

The Structo Control


TStructo.Paint
TStructo.Paint (Method)

Syntax:

procedure Paint(PaintDC: HDC; var PaintInfo: TPaintStruct); virtual;

Description:

Fills a TDrawItemStruct and sends a wm_DrawItem message. You should not overwrite this method!

See also:

The Structo Control


How to register

All SMWCC controls were created by:

Sebastian Modersohn Softwaredevelopment Heinestrasse 20 D 15370 Petershagen, Germany Phone: +49 33439 7462 CompuServe ID: 100340,1474

This is a shareware product. This allows you to try the software before you buy it. If after evaluating this control, you decide to continue using it, you are required to register the software by remitting the registration fee of $10 to us.

To register "GO SWREG" inside CompuServe and register these controls (Structo & MenuButton) with the database ID 4676.

After CompuServe has send us your User ID we will send the souce code of the control via E-Mail as quickly as possible to you.

See also:

Other controls

Other procucts


How to install

You can copy the files of the control in every directory you want. But you have to change the HelpFile constant in each constant-unit to the path of this helpfile, if you want to use this help inside Resource Workshop or in the demo application.

To install the custom controls for the Resource Workshop chosse the menu item Install Library... from the menu Options while you are editing a dialog. Then a file dialog occurs there you can select the DLL you want to install (STRUCTOS.DLL and MBUTTONS.DLL I think!).

If you want to remove a custom control or want to copy the DLL in an other directory you'll have to change the workshop.ini file in the WINDOWS directory (you'll see how and where).

To "install" a custom control for your program you should make sure that windows will find the library file. The most simply solution is to copy the DLL-files into the WINDOWS\SYSTEM directory.

If you do not want this, copy the DLL in a directory which is in your PATH statement in autoexec.bat or give the full path string to the LoadLibrary statement in the app's Init constructor, something like that:

...

DLL:=LoadLibrary('c:\myprog\dlls\name.dll');

...

See the demo code and the BP help for more information about loading librarys.

See also:

Other controls

Other procucts


Other controls of the SMWCC pack

Also available from

Sebastian Modersohn Softwaredevelopment Heinestrasse 20 D 15370 Petershagen, Germany Phone: +49 33439 7462 CompuServe ID: 100340,1474
are the following controls:

Name	  Description

Color Control	  This is a control to make color-choosing easier than to call an extra common-dialog!
-it supports the 16 base-colors
-You can choose 1 or 2 (foreground/background) colors
-supports keyboard and mouse selection
The unregistered version is available via CompuServe, forum BPASCAL, Library Windows Tools[10], file COLOR.ZIP. You can register The Color Control for $10 in the forum SWREG. The database ID of the Color control is 4671.

PercentBar	  This control is a "simply to use" percent bar.
-supports Ctl3D frame
-customizable filled color
The unregistered version is available via CompuServe, forum BPASCAL, Library Windows Tools[10], file PBAR.ZIP. You can register The Percent Bar control for $10 in the forum SWREG. The database ID of The percent bar is 4677.

Ctl3D Ctl	  The Ctl3D control allows you to have the Ctl3D outfit for your dialogs by simply placing it into a dialog (while editing the dialog in Resource Workshop too!)
The unregistered version is available via CompuServe, forum BPASCAL, Library Windows Tools[10], file 3DCTL.ZIP. You can register The Ctl3D Control for $10 in the forum SWREG. The database ID of the Ctl3D-control is 4672.

Font Control	  The Font control allows you to set a non-bold font for all controls specified by an ID-range.
The unregistered version is available via CompuServe, forum BPASCAL, Library Windows Tools [10], file FNTCTL.ZIP. You can register The Font Control for $5 in the forum SWREG. The database ID of Font is 4673.

HifiButton	  This is a button which looks like a button of a CD-Player or something like that (just have a look!) with optional on/off LED.
The unregistered version is available via CompuServe, forum BPASCAL, Library Windows Tools[10], file HIFIBTN.ZIP. You can register The HifiButton for $10 in the forum SWREG. The database ID of the HifiButton is 4675.

MicroScroll	  The MicroScroll control is a mini-scrollbar which is normally used to increase or decrease the value of the corresponding edit control.
It can be partially disabled and supports units (for the edit values).
The unregistered version is available via CompuServe, forum BPASCAL, Library Windows Tools[10], file MSCROLL.ZIP. You can register the MicroScroll for $10 in the forum SWREG. The database ID of the MicroScroll is 4674.

Text control	  This is a control for simply placing all kinds of text in a dialog (all fonts, styles, justifications, colors and effects possible!).

The unregistered version is available via CompuServe, forum BPASCAL, Library Windows Tools[10], file TEXT.ZIP. You can register the Text control for $10 in the forum SWREG. The database ID of the Text control is 4678.

See also:

Other procucts


Other products

Also available from

Sebastian Modersohn Softwaredevelopment Heinestrasse 20 D 15370 Petershagen, Germany Phone: +49 33439 7462 CompuServe ID: 100340,1474
are the following products:

Name	  Description

Clip Controls	  An BP7-tool for adding buttons to the caption bar of every kind of window by only adding one or two lines of code and some bitmaps for the outfit.
Features:
-supports Windows, MDI-Windows, MDI-Childs (with buttons in the menu bar if maximized), JanusWindows (from JanusW by Peter Sawatzki (necessary code included), see JANUSW.ZIP in BPASCAL for more info), Dialogs and tDlgWindows
-supports Ctl3D-dialogs!!!
-TOTALLY style-guide conform
-supports tips (little yellow text windows, known as hints too)
-demo code for all windows, if registered source code too
The unregistered version is available via CompuServe, forum BPASCAL, library Windows Tools[10], file CLIPCON.ZIP. You can register The Clip Controls for $10 in the forum SWREG. The database ID of The Clip Controls is 4195.

See also:

Other controls